<template>
  <div
    class="jy-style-height message-box"
    :style="{
      'background-image': `url(${publicUrls + 'free/style8/publicStyle8Bg2.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="message-heard">
      <img class="backHome" @click="blankHome" :src="publicUrls + 'free/style8/backHome.png'" alt="" />
      <div class="heard-title">
        <img :src="publicUrls + 'free/style8/exhibitTitleBg.png'" alt="" />留言板
        <img :src="publicUrls + 'free/style8/exhibitTitleBg2.png'" alt="" />
      </div>
      <div class="backHome"></div>
    </div>
    <div class="cultural-bg">
      <div class="border"></div>
      <div class="comment-box">
        <comment text="发表" />
      </div>
      <div class="commentList-box">
        <div class="commentNum" v-if="total !== 0">共{{ total }}条留言</div>
        <div class="commentList-box-content">
          <ScrollBox
            color="rgba(50, 43, 37, 1)"
            v-if="scrollheight"
            :byid="4235"
            :width="scrollheight"
            :scroll-src="publicUrls + 'free/style8/scrollBar.png'"
          >
            <template #solidBorderCon>
              <commentList
                @emitTotal="emitTotal"
                textColor="rgba(0, 0, 0, 0.8)"
                bgColor="rgba(218, 211, 190, 0.6)"
                replyColor="rgba(0, 0, 0, 0.8)"
              />
            </template>
            <template #solidBorderEx>
              <div class="solidBorder-child"></div>
            </template>
          </ScrollBox>
        </div>
      </div>
    </div>
    <MenuNavigation />
    <div class="content-door">
      <i class="iconfonts">&#xe6dd;</i>
      <span>永不落幕的展览与展示平台</span>
    </div>
    <!-- <div class="unit-exbit-upbg">
      <div class="border"></div>
    </div> -->
  </div>
</template>

<script lang="ts">
// @ts-nocheck
export default defineComponent({
  name: 'style8',
});
</script>

<script setup lang="ts">
// @ts-nocheck
import { defineComponent, ref } from 'vue';
import comment from '../messageComponent/style8/comment.vue';
import commentList from '../messageComponent/style8/commentList.vue';
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
const commonStore = commonDataStore();
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const router = useRouter();
const route = useRoute();
const store = useProjectStore();
const total = ref(0);
const scrollheight = ref();
let viewportHeight = window.innerHeight;
scrollheight.value = viewportHeight * 0.4388;
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
const emitTotal = (num: number) => {
  total.value = num;
};
</script>

<style scoped lang="less">
.message-box {
  width: 100%;
  padding: 48px 0;
  padding-bottom: 0px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}
.content-door {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  opacity: 0.5;
  .iconfonts {
    font-size: 26px;
    color: #fff;
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: #fff;
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
.cultural-bg {
  width: 94%;
  height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: #e8e4d9;
  border: 4px #e8e4d9 solid;
  margin: 0 auto;
  .border {
    width: 100%;
    height: 100%;
    background: #4f6e5c;
    position: absolute;
    top: 0;
    clip-path: polygon(
      0 12px,
      12px 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% calc(100% - 12px),
      calc(100% - 12px) 100%,
      12px 100%,
      0 calc(100% - 12px),
      0 12px,
      2px calc(12px + 0.83px),
      2px calc(100% - 12px - 0.83px),
      calc(12px + 0.83px) calc(100% - 2px),
      calc(100% - 12px - 0.83px) calc(100% - 2px),
      calc(100% - 2px) calc(100% - 12px - 0.83px),
      calc(100% - 2px) calc(12px + 0.83px),
      calc(100% - 12px - 0.83px) 2px,
      calc(12px + 0.83px) 2px,
      2px calc(12px + 0.83px)
    );
  }
  clip-path: polygon(
    0 12px,
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}
.message-heard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
  padding: 0 60px;

  .backHome {
    cursor: pointer;
    width: 24px;
    height: 22px;
    margin-left: 0 !important;
  }
  .heard-title {
    width: 228px;
    color: #f1ecdf;
    font-family: 'SourceHanSerifCN-Bold';
    font-size: 32px;
    line-height: 48px;
    margin-left: 70px;
    display: flex;
    align-items: center;
    img {
      width: 16px;
      height: 32px;
      margin-right: 16px;
      &:last-child {
        margin-left: 16px;
        margin-right: 0 !important;
      }
    }
  }
}

// .unit-exbit-upbg {
//   width: 94%;
//   height: 700px;
//   background: #e8e4d9;
//   position: absolute;
//   bottom: 44px;
//   left: 50%;
//   transform: translate(-50%);
//   border: 4px #e8e4d9 solid;
//   .border {
//     width: 100%;
//     height: 100%;
//     background: #4f6e5c;
//     clip-path: polygon(
//       0 12px,
//       12px 0,
//       calc(100% - 12px) 0,
//       100% 12px,
//       100% calc(100% - 12px),
//       calc(100% - 12px) 100%,
//       12px 100%,
//       0 calc(100% - 12px),
//       0 12px,
//       2px calc(12px + 0.83px),
//       2px calc(100% - 12px - 0.83px),
//       calc(12px + 0.83px) calc(100% - 2px),
//       calc(100% - 12px - 0.83px) calc(100% - 2px),
//       calc(100% - 2px) calc(100% - 12px - 0.83px),
//       calc(100% - 2px) calc(12px + 0.83px),
//       calc(100% - 12px - 0.83px) 2px,
//       calc(12px + 0.83px) 2px,
//       2px calc(12px + 0.83px)
//     );
//   }
//   clip-path: polygon(
//     0 12px,
//     12px 0,
//     calc(100% - 12px) 0,
//     100% 12px,
//     100% calc(100% - 12px),
//     calc(100% - 12px) 100%,
//     12px 100%,
//     0 calc(100% - 12px)
//   );
// }

.comment-box {
  width: 100%;
  margin-bottom: 40px;
  padding: 0 56px;
}
.commentList-box {
  display: flex;
  flex-direction: column;
  //   flex: 1;
  padding: 0 56px;
  height: 440px;
  width: 100%;
}

.commentNum {
  width: 100%;
  height: 24px;
  font-family: PingFang SC;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.59);
  line-height: 24px;
  text-align: left;
  margin-bottom: 30px;
}
.commentList-box-content {
  width: 100%;
  height: 100%;
  // overflow: auto;
  ::v-deep .solid-border {
    left: 0;
  }
  ::v-deep .templatestyle1-scroll-box-tumb {
    left: -4px;
  }
}
.solidBorder-child {
  width: 2px;
  height: 100%;
  background: #395d48;
  opacity: 0.2;
}
::v-deep .unit-exbi-remarks-info-remarks {
  width: 100% !important;
}
::v-deep .solid-box-parent-p {
  right: -50px;
}
::v-deep .solid-box-parent {
  margin-right: 20px;
}
::v-deep .templatestyle1-scroll-box-tumb {
  align-items: center;
  justify-content: center;
  top: -5px;
}
.commentList-box-content::-webkit-scrollbar {
  display: none;
}
::v-deep .t-textarea__inner {
  background: rgba(218, 211, 190, 1);
  clip-path: polygon(
    0 8px,
    8px 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    8px 100%,
    0 calc(100% - 8px)
  );
}

::v-deep .t-textarea__inner:hover {
  border: 1px solid transparent;
}
:deep(.t-avatar) {
  width: 48px !important;
  height: 48px !important;
}
::v-deep .commentItem {
  margin-bottom: 50px;
}
::v-deep .name {
  color: rgba(0, 0, 0, 0.59);
}
::v-deep .data {
  color: rgba(0, 0, 0, 0.38);
}

::v-deep .templatestyle1-scroll-box-tumb {
  display: flex;
  justify-content: center;
  align-items: center;
  top: -4px;
  .scrollBar {
    width: 6px;
    height: 100%;
    background: rgba(86, 103, 123, 1);
    border-radius: 4px;
    box-shadow: none;
  }
}
</style>